
//  HelperModifyUserIconSize.m
//  UserCenter
//
//  Created by lanou3g on 16/3/3.
//  Copyright © 2016年 GKZYAid. All rights reserved.
//

#import "HelperModifyUserIconSize.h"

@implementation HelperModifyUserIconSize

- (UIImage *)modifyUserHeaderPortraitSize:(UIImage *)userHeaderPortrait WithImageWidth:(CGFloat)width imageHeight:(CGFloat) height
{
    UIGraphicsBeginImageContext(CGSizeMake(width, height));
    [userHeaderPortrait drawInRect:CGRectMake(0, 0, width, height)];
    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return newImage;
}

@end
